package com.mingqijia.gassafety.authority.api.resp.department;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;
import java.util.List;

/**
 * 创建后的返回数据
 * @author Damon S.
 * @version v0.2
 * @date 2021-06-19
 */
@Data
@ApiModel(value = "组织管理数据")
public class DepartmentRespDTO implements Serializable {
    @ApiModelProperty(value = "部门ID")
    private String id;

    @ApiModelProperty(value = "部门类型")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String type;

    @ApiModelProperty(value = "部门名称")
    private String name;

    @ApiModelProperty(value = "状态")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private Integer state;

    @ApiModelProperty(value = "排序值")
    private Integer ordinal;

    @ApiModelProperty(value = "企业ID")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String spId;

    @ApiModelProperty(value = "父级组织")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<String> parentId;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String parentCn;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String typeCn;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    private Date updatedAt;

    @ApiModelProperty(value = "下级部门")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<DepartmentRespDTO> children;
}